package com.woori;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Foo {

	@Autowired
	private Bar bar;
	
	public Foo(){}
	
	public Foo(Bar bar){
		this.bar = bar;
	}
	
	public void setBar(Bar bar){
		this.bar = bar;
	}
	public void doFoo(){
		//bar.doBar()
		System.out.println("doFoo!");
		bar.doBar();
	}
}
